<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
<h:head><title>PrimeFaces Test</title>
</h:head>
<h:body>

<div align="center">
<h1 class="ui-widget-header ui-corner-all" align="center">PrimeFaces Test</h1>
<br/>
<p:fieldset legend="Spinner &amp; Calendar (No Server Behavior)">  <!-- p:fieldset is not required, but is good because it gives legend that uses current PrimeFaces theme -->
<p>
This example just verifies that PrimeFaces is installed properly. The first 
entry should look like a number spinner, and the second should look
like a textfield. If you see this, and if a calendar pops up when you click in 
the second the field, then you correctly included the PrimeFaces JAR file and correctly
added the PrimeFaces declaration to the &lt;html...&gt; start tag.
</p>
<h:form>
   <b>Choose number:</b> <p:spinner/><br/>
   <b>Choose date:</b> <p:calendar/>
</h:form>
</p:fieldset>
<br/>
<p:fieldset legend="Spinner &amp; Calendar (With Server Behavior)">
<p>
This example shows some simple server-side behavior. In particular, it
shows that the PrimeFaces input components often automatically convert types. So,
in this case, the associated getter and setter of the spinner should be 
of type double, and the getter and setter for the calendar should be of type Date,
and no user conversion is needed in either case. Also note that this example has no validation; 
see the later section on date and number input for a more realistic calendar example that validates the input.
</p>
<h:form>
   <b>Choose number:</b> <p:spinner value="#{testBean.number}"/><br/>
   <b>Choose date:</b> <p:calendar value="#{testBean.date}"/><br/>
   <p:commandButton action="#{testBean.doAction}" 
                    value="Submit" ajax="false" />
</h:form>
</p:fieldset>
</div>
<br/><br/><br/>



<br/><br/><br/><br/><br/><br/><br/><br/><hr/>
<font size="-3">All code from the
<a href="http://courses.coreservlets.com/Course-Materials/">
coreservlets.com J2EE tutorials (servlets, JSP, JSF 2, PrimeFaces, Ajax with jQuery, GWT, Spring, Hibernate, JPA, Hadoop, 
SOAP-based and RESTful Web Services, Android development, &amp; Java 7 programming)</a>. There are also live instructor-led
<a href="http://courses.coreservlets.com/">training courses on
the same J2EE topics (servlets, JSP, JSF 2, PrimeFaces, Ajax with jQuery, GWT, Spring, Hibernate, JPA, Hadoop, 
SOAP-based and RESTful Web Services, Android development, &amp; Java 7 programming)</a> These courses
can be customized and taught onsite at <i>your</i> organization.
Also see the <a href="http://www.coreservlets.com/JSF-Tutorial/jsf2/">JSF 2 tutorial</a> and the
<a href="http://www.coreservlets.com/JSF-Tutorial/primefaces/">PrimeFaces tutorial</a>.</font>
</h:body></html>